package com.atom.common.util;

import com.atom.common.exception.AvensNullPointerException;

public class PreConditionUtil {

  public static Object checkNotNull(Object object, String message) {
    if (object == null) {
      throw new AvensNullPointerException(message);
    } else {
      return object;
    }
  }

  public static String checkNotEmpty(String s, String message) {
    if (s == null || s.isEmpty()) {
      throw new AvensNullPointerException(message);
    } else {
      return s;
    }
  }
}
